import request from '@/libs/request'

/**
 * 获取通道列表
 */
export function channellist (data) {
  return request.get('getchannellist', data)
}

/**
 * 编辑新增通道
 */
export function saveChannel (data) {
  if (data.id) {
    return request.put('editchannel/' + data.id, data)
  } else {
    return request.post('addchannel', data)
  }
}

export function delChannel (id) {
  return request.get('delchannel/' + id)
}
